let t = require;
let  e = module
let  o =  e.exports;
 o.default =  e.exports;

                'use strict';
                console.log("start"),
                    Object.defineProperty(o, '__esModule', {
                        value: !0
                    }),
                    (o.DataMrg = void 0);
                var n = t('ClassUtils'),
                    i = t('GlobalEventMrg'),
                    r = t('GameSDK'),
                    a = t('TimeMrg'),
                    s = t('DateTimeUtils'),
                    c = t('MD5'),
                    l = (function() {
                        function t() {}
                        return (
                            (t.init = function(e) {
                                this._map.forEach(function(t, o) {
                                        t.init(e[o]);
                                    }),
                                    a.TimeMrg.timer.add(t.onTickHandler, this, 2),
                                    i.default.on(i.GlobalEvent.NewDay, this.onNewDay, this),
                                    e &&
                                    e.time &&
                                    s.DateTimeUtils.checkLastDay(e.time) &&
                                    this.onNewDay();
                            }),
                            (t.onTickHandler = function() {
                                this.doSave();
                            }),
                            (t.onNewDay = function() {
                                this._map.forEach(function(t) {
                                    t.newDay();
                                });
                            }),
                            (t.register = function(t) {
                                var e = n.default.getClassName(t);
                                this._map.has(e) || this._map.set(e, t);
                            }),
                            (t.doSave = function() {
                                var t = {};
                                this._map.forEach(function(e, o) {
                                    t[o] = e.getData();
                                });
                                var e = c.default.hex_md5(JSON.stringify(t));
                                e != this._md5 &&
                                    ((t.time = a.TimeMrg.serverTime),
                                        r.default.saveData(t),
                                        (this._md5 = e));
                            }),
                            (t._map = new Map()),
                            t
                        );
                    })();
                (o.DataMrg = l), console.log("end");
            module.exports =  e.exports;